home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / binutils.7 / binutils / binutils-2.7 / ld / scripttempl / i386go32.sc < prev    next >
Encoding:
Text File  |  1996-07-04  |  873 b   |  46 lines

  1. # Linker script for i386 go32 COFF.
  2. # stolen from ian
  3. test -z "$ENTRY" && ENTRY=_start
  4. # These are substituted in as variables in order to get '}' in a shell
  5. # conditional expansion.
  6. INIT='.init : { *(.init) }'
  7. FINI='.fini : { *(.fini) }'
  8. cat <<EOF
  9. OUTPUT_FORMAT("${OUTPUT_FORMAT}")
  10. ${LIB_SEARCH_DIRS}
  11.  
  12. ENTRY(${ENTRY})
  13.  
  14. SECTIONS
  15. {
  16.   .text ${RELOCATING+ 0x10a8} : {
  17.     ${RELOCATING+ *(.init)}
  18.     *(.text)
  19.     ${RELOCATING+ *(.fini)}
  20.     ${RELOCATING+ etext  =  .};
  21.   }
  22.   .data ALIGN (0x1000) : {
  23.     *(.data .data2)
  24.     *(.ctor)
  25.     *(.dtor)
  26.     ${RELOCATING+ _edata  =  .};
  27.   }
  28.   .bss ${RELOCATING+ SIZEOF(.data) + ADDR(.data)} :
  29.   {                     
  30.     *(.bss)
  31.     *(COMMON)
  32.     ${RELOCATING+ end = .};
  33.   }
  34.   ${RELOCATING- ${INIT}}
  35.   ${RELOCATING- ${FINI}}
  36.   .stab  0 ${RELOCATING+(NOLOAD)} : 
  37.   {
  38.     [ .stab ]
  39.   }
  40.   .stabstr  0 ${RELOCATING+(NOLOAD)} :
  41.   {
  42.     [ .stabstr ]
  43.   }
  44. }
  45. EOF
  46.